package com.lanou.tk.tourism.activity;

import android.app.Activity;
import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.bartoszlipinski.recyclerviewheader.RecyclerViewHeader;
import com.lanou.tk.tourism.R;
import com.lanou.tk.tourism.adapter.RecommendHotelAdapter;

/**
 * Created by dllo on 15/10/29.
 */
public class RecommendHotelActivity extends Activity {
    private RecyclerView recommend_Hotel_Rv;
    private RecommendHotelAdapter recommendHotelAdapter;




    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_hotel_recommend);

        recommendHotelAdapter = new RecommendHotelAdapter();
        recommend_Hotel_Rv = (RecyclerView) findViewById(R.id.recommend_Hotel_Rv);
        RecyclerViewHeader header = (RecyclerViewHeader) findViewById(R.id.recommend_Hotel_Rv_header);
        GridLayoutManager gridLayoutManager = new GridLayoutManager(this,3);
        recommend_Hotel_Rv.setLayoutManager(gridLayoutManager);
        recommend_Hotel_Rv.setAdapter(recommendHotelAdapter);
        header.attachTo(recommend_Hotel_Rv);






    }
}
